#!/bin/bash
#========================================================================
# Author: YSLin
# Email: 
# File Name: dir.sh
# Description: 
#   
# Edit History: 
#   2011-02-16    File created.
#========================================================================

mkdir "d i r";
touch "f i l e";

echo "===dir but space will cause for loop error===";
for dir in `find . -maxdepth 1 -type d ` 
do
	echo $dir
done

echo "===file===";
for file in *
do
	echo $file
done

echo "===dir===";
for dir in ./*/
do
	echo $dir
done

echo "===file with space===";
for file in *\ *
do
	echo $file
done 
rmdir "d i r";
rm "f i l e"
